package com.cyzy.utils;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * TODO
 *
 * @author Honarly
 * @date 2024.11.13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MessageUtil {
    private Boolean isSystem;
    // 1用户分配到客服
    private Integer type;
    private String message;
    private Object data;

    public static String setMessage(Boolean isSystem, Integer type, String message, Object data) {
        return JSON.toJSONString(new MessageUtil(isSystem, type, message, data));
    }
}
